<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <%
    String path = request.getContextPath();
    String basePath =
            request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
                    + path + "/";
    response.setHeader("Pragma", "No-cache");
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 0);
%>  
<!DOCTYPE html >
<html>
<head>
<title>任务列表</title>
<link rel="shortcut icon" href="<%=basePath%>rs/assets/img/favicon.png">
    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/colorbox.css" />
    <!-- text fonts -->
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace-fonts.css"/>
    <!-- ace styles -->
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace.min.css"
          id="main-ace-style"/>
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace-part2.min.css"/>
    <![endif]-->
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace-skins.min.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/chosen.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/datepicker.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/daterangepicker.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/bootstrap-table.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/bootstrap-treeview.css"/>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace.onpage-help.css" />
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/jquery.shCircleLoader.css" />
    <link rel="stylesheet" href="<%=basePath%>rs/assets/js/umeditor/themes/default/css/umeditor.css" />
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="<%=basePath%>rs/assets/css/ace-ie.min.css"/>
    <![endif]-->

    <!--[if lt IE 9]>
    <script src="<%=basePath%>rs/assets/js/html5shiv.js"></script>
    <script src="<%=basePath%>rs/assets/js/respond.min.js"></script>
   <!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
    window.jQuery || document.write("<script src='<%=basePath%>rs/assets/js/jquery.min.js'>" + "<" + "/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='<%=basePath%>rs/assets/js/jquery1x.min.js'>" + "<" + "/script>");
</script>
<![endif]-->
<script type="text/javascript">
    if ('ontouchstart' in document.documentElement) document.write("<script src='<%=basePath%>rs/assets/js/jquery.mobile.custom.min.js'>"
            + "<" + "/script>");
</script>
<script src="<%=basePath%>rs/assets/js/bootstrap.min.js"></script>

<!-- page specific plugin scripts -->
<script src="<%=basePath%>rs/assets/js/jquery.form.js"></script>
<!--[if lte IE 8]>
<script src="<%=basePath%>rs/assets/js/excanvas.min.js"></script>
<![endif]-->
<script src="<%=basePath%>rs/assets/js/jquery-ui.custom.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.ui.touch-punch.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.sparkline.min.js"></script>
<script src="<%=basePath%>rs/assets/js/flot/jquery.flot.min.js"></script>
<script src="<%=basePath%>rs/assets/js/flot/jquery.flot.pie.min.js"></script>
<script src="<%=basePath%>rs/assets/js/flot/jquery.flot.resize.min.js"></script>

<!-- ace scripts -->
<script src="<%=basePath%>rs/assets/js/ace.min.js"></script>
<script src="<%=basePath%>rs/assets/js/ace-elements.min.js"></script>
<script src="<%=basePath%>rs/assets/js/bootstrap-treeview.js"></script>
<script src="<%=basePath%>rs/assets/js/fuelux/fuelux.spinner.min.js"></script>


<script src="<%=basePath%>rs/assets/js/chosen.jquery.min.js"></script>
<script src="<%=basePath%>rs/assets/js/fuelux/fuelux.spinner.min.js"></script>
<script src="<%=basePath%>rs/assets/js/date-time/bootstrap-datepicker.js"></script>
<script src="<%=basePath%>rs/assets/js/date-time/bootstrap-timepicker.min.js"></script>
<script src="<%=basePath%>rs/assets/js/date-time/moment.min.js"></script>
<script src="<%=basePath%>rs/assets/js/date-time/daterangepicker.min.js"></script>
<script src="<%=basePath%>rs/assets/js/date-time/bootstrap-datetimepicker.min.js"></script>
<script src="<%=basePath%>rs/assets/js/bootstrap-colorpicker.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.knob.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.autosize.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.inputlimiter.1.3.1.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.maskedinput.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.messager.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.dialog.js"></script>
<script src="<%=basePath%>rs/assets/js/bootstrap-tag.min.js"></script>
<script src="<%=basePath%>rs/assets/js/typeahead.jquery.min.js"></script>

<script type="text/javascript"> ace.vars['base'] = '..'; </script>
<script src="<%=basePath%>rs/assets/js/ace/elements.onpage-help.js"></script>
<script src="<%=basePath%>rs/assets/js/ace/ace.onpage-help.js"></script>

<script src="<%=basePath%>rs/assets/js/jquery.dataTables.min.js"></script>

<script src="<%=basePath%>rs/assets/js/jquery.dataTables.bootstrap.js"></script>
<script src="<%=basePath%>rs/assets/js/bootstrap-table.min.js"></script>
<%-- <script src="<%=basePath%>rs/assets/js/bootstrap-table.js"></script> --%>

<script src="<%=basePath%>rs/assets/js/fuelux/fuelux.wizard.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.colorbox-min.js"></script>
<script src="<%=basePath%>rs/assets/js/ace/elements.onpage-help.js"></script>


	
<script src="<%=basePath%>rs/assets/js/bootstrap-wysiwyg.min.js"></script>
<script src="<%=basePath%>rs/assets/js/jquery.hotkeys.min.js"></script>

<script src="<%=basePath%>rs/assets/js/jquery.shCircleLoader-min.js"></script>

<script src="<%=basePath%>rs/assets/js/javascriptCheck.js"></script>

</head>
<body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
	<span id="addName" style="float: right;margin: 11px 26px 0 0;color: #fff;">欢迎　<span></span><a href="<%=basePath%>qrsms/cancel"; style="color: #fff;margin-left: 16px;cursor: pointer;text-decoration: blink;">注销</a></span>
    <div class="navbar-container" id="navbar-container">
        <!-- #section:basics/sidebar.mobile.toggle -->
        
        <!-- /section:basics/sidebar.mobile.toggle -->
        
        <!-- #section:basics/navbar.dropdown -->
       
    </div>
    <!-- /.navbar-container -->
</div>
<!-- /.main-content -->
<div class="main-content" style="margin-top: 60px;">

<!-- /section:basics/content.breadcrumbs -->
<div class="row">
			<div class="col-md-12">
				<h3 class="header smaller lighter blue">任务列表</h3>
				<div class="widget-body">
						<div class="widget-main">
							<div class="row">
							<div class="col-md-4">
									&nbsp;
							</div>
							
							<div class="col-md-4">&nbsp;</div>
							<div class="col-md-4">
									<div class="input-group">
										<span class="">
											<a href="<%=basePath%>qrsms/uploadtask"><button id="returnBtn" type="button" class="btn btn-green btn-sm">
													任务配置页
													
												</button></a>&nbsp;&nbsp;&nbsp;
												<a href="<%=basePath%>qrsms/tasklistpage"><button id="addBtn" type="button" class="btn btn-sm btn-info " onclick="golist()">
													任务列表页
													
												</button></a>&nbsp;&nbsp;&nbsp;
												<a href="<%=basePath%>show/ShowRule1"><button id="addBtn" type="button" class="btn btn-sm btn-info " onclick="golist()">
													关于规则
													
												</button></a>&nbsp;&nbsp;&nbsp;
										</span>
									</div>
								</div>
							</div>
							
							
							
							
						</div>
					</div>
				<div class="table-header" style="margin-top: 20px;">&nbsp;</div>
				<table id="tableInfo"></table>
			</div>
		</div><div class="page-content">
	<div class="page-content-area">
        
	</div><!-- /.page-content-area -->
</div><!-- /.page-content -->
<div>

</div>
</div><script type="text/javascript">


function queryParams(params) {
	var param={
			offset: params.offset,
			limit: params.limit
	};
	  return param;
}

function doSearch(){
    	
    		var url = "<%=basePath%>qrsms/tasklist";
    		
            $('#tableInfo').bootstrapTable({
                method: 'get',
                url: url,
		        cache: false,
		        height: 450,
		        striped: true,
		        pagination: true,
		        sidePagination: 'server',
		        queryParams: queryParams,
		        pageNumber: 1,
		        pageSize: 10,
		        pageList: [10, 20],
                columns: [{
                    field: 'CUSTOM_ID',
                    title: '客户ID',
                    align: 'center',
                    valign: 'middle'
                },{
                    field: 'CUSTOM_NAME',
                    title: '客户名称',
                    align: 'center',
                    valign: 'middle'
                }, {
	                field: 'RULE_NUMBER',
	                title: '触发规则编号',
	                align: 'center',
	                valign: 'middle'
	            }, {
	                field: 'MARKETING_CYCLE',
	                title: '营销周期',
	                align: 'center',
	                valign: 'middle'
	            }, {
	                field: 'ALL_SEND_CNT',
	                title: '总发送数量',
	                align: 'center',
	                valign: 'middle'
	            }, {
	                field: 'SINGLE_SEND_CNT',
	                title: '个体发送数量',
	                align: 'center',
	                valign: 'middle'
	            }, {
	                field: 'SINGLE_SEND_CYCLE',
	                title: '个体发送间隔',
	                align: 'center',
	                valign: 'middle'
	            }, {
	                field: 'TRANSFORM_FLAG',
	                title: '是否可用',
	                align: 'center',
	                valign: 'middle',
	                formatter:function(value){
	                	if(value==0){
	                		return "无连接/未转换可用";
	                	}else if(value==1){
	                		return "转换成功可用";
	                	}
	                }
	            }]
            });
    }


	$(function() { 
		
		$(window).resize(function () {$('#tableInfo').bootstrapTable('resetView'); });
		doSearch();
			
		
	});
	$(function(){
	$.ajax({    
            type:'post',        
           	url:'<%=basePath%>qrsms/cookiers',
            cache:false,    
            dataType:'json',    
            success:function(data){
	            $('#addName span').text(data);
            }    
        });
});
	
	
	
	
	
</script>	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


</body>
</html>